<?php
use_stylesheet('show.css');
use_helper('toolsbar');
slot('Toolsbar');
   echo setToolbar('show','supplier',$supplier);
end_slot();

slot('PageTitle',$supplier->getName());
slot('Title',$supplier->getName());
?>

<table id="show">
  <tbody>
    <tr>
      <th>Name: </th>
      <td colspan="3"> <?php echo " ".$supplier->getName() ?></td>
    </tr>
    <tr>
      <th>Type: </th>
      <td><?php echo $supplier->getType() ?></td>
    </tr>
    <tr>
      <th>Ref1: </th>
      <td><a href="<?php echo url_for('contact_show',$supplier->getContact()) ?>"><?php echo $supplier->getContact() ?></td> 
      <td> &nbsp; - Phone: <?php if (!is_null($supplier->getContact()->getphone1())) echo $supplier->getContact()->getPhone1(); else echo "-"?> </td>
      <td> &nbsp; - Mail: <?php if (!is_null($supplier->getContact()->getMail1())) echo $supplier->getContact()->getMail1(); else echo "-"?> </td>
    </tr>    
    <tr>
      <th>Ref2: </th>
      <td><a href="<?php echo url_for('contact_show',$supplier->getContact_2()) ?>"><?php echo $supplier->getContact_2() ?></td> 
    <?php if (!is_null($supplier->getContact_2()->getName())): ?>
      <td> &nbsp; - Phone: <?php if (!is_null($supplier->getContact_2()->getphone1())) echo $supplier->getContact_2()->getPhone1(); else echo "-"?> </td>
      <td> &nbsp; - Mail: <?php if (!is_null($supplier->getContact_2()->getMail1())) echo $supplier->getContact_2()->getMail1(); else echo "-"?> </td>
    <?php endif;?>
    </tr>
    <tr>
      <th>Ref3: </th>
      <td><a href="<?php echo url_for('contact_show',$supplier->getContact_3()) ?>"><?php echo $supplier->getContact_3() ?></td>
    <?php if (!is_null($supplier->getContact_3()->getName())): ?>
      <td> &nbsp; - Phone: <?php if (!is_null($supplier->getContact_3()->getphone1())) echo $supplier->getContact_3()->getPhone1(); else echo "-"?> </td>
      <td> &nbsp; - Mail: <?php if (!is_null($supplier->getContact_3()->getMail1())) echo $supplier->getContact_3()->getMail1(); else echo "-"?> </td>
    <?php endif; ?>
    </tr>
    <tr>
      <th>Address: </th>
      <td colspan="3"><?php echo $supplier->getAddress() ?></td>
    </tr>
    <tr>
      <th>Path: </th>
      <td colspan="3"><?php echo $supplier->getPath() ?></td>
    </tr>
    <tr>
      <th>Note: </th>
      <td colspan="3"><?php echo $supplier->getNote() ?></td>
    </tr>
  </tbody>
</table>

